package com.sright.bcard.user.dal.dao;

import com.sright.bcard.common.service.share.base.dao.BaseDAO;
import com.sright.bcard.user.dal.entity.VisitorListDO;
import com.sright.bcard.user.dal.entity.ext.VisitorRelationEXTDO;

import java.util.Date;
import java.util.List;

public interface VisitorListDAO extends BaseDAO<VisitorListDO> {

    Integer deleteByPrimaryKey(Long id);

    List<VisitorListDO> selectByEnterpriseIdAndSourceIdNotZero(Long enterpriseId);

    List<VisitorListDO> selectByEnterpriseId(Long enterpriseId);

    List<VisitorListDO> selectByEnterpriseIdBwtDate(Long enterpriseId, Date beginDate, Date endDate);

    List<VisitorListDO> selectByEnterpriseIdAndMemberIdBeforeDate(Long enterpriseId, Long visitorMemberId, Date beginDate);

    List<VisitorListDO> selectByVisitorId(Long visitorId);

    Integer selectSumTimeByVisitorId(Long id);

    List<VisitorListDO> selectAllByVisitorId(Long visitorId);

    List<VisitorRelationEXTDO> selectByMemberId(Long visitorMemberId);

    List<VisitorRelationEXTDO> selectByUserId(List<Long> visitorUserId);

    List<VisitorListDO> selectByUserIdAndData(Long userId, Date beginTime, Date endTime, Long memberId);
}
